﻿/*
ChangeTracking (a library for POCO change tracking).

Copyright (C) 2014 Dmitry Merzagitovich Arslanov

This library is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free
Software Foundation; either version 2.1 of the License, or (at your option) any
later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace ChangeTrackingSample
{
    public partial class ModifyDialog : Window
    {
        public string EntityName
        {
            get { return (string)GetValue(EntityNameProperty); }
            set { SetValue(EntityNameProperty, value); }
        }

        public static readonly DependencyProperty EntityNameProperty =
            DependencyProperty.Register("EntityName",
                                        typeof(string),
                                        typeof(ModifyDialog),
                                        new PropertyMetadata(null));

        public double EntityValue
        {
            get { return (double)GetValue(EntityValueProperty); }
            set { SetValue(EntityValueProperty, value); }
        }

        public static readonly DependencyProperty EntityValueProperty =
            DependencyProperty.Register("EntityValue",
                                        typeof(double),
                                        typeof(ModifyDialog),
                                        new PropertyMetadata(0.0));

        public ModifyDialog()
        {
            InitializeComponent();
        }

        private void OkClick(object sender, RoutedEventArgs e)
        {
            DialogResult = true;
        }
    }
}
